#ifndef _ENVIRON_H_
#define _ENVIRON_H_ 1
#include "command.h"
#include <unordered_map>
#include <string>
#include <vector>
enum Lang{ENG,FRA};
enum Format{TXT,XML};
struct Environ{
  enum Lang lang;
  enum Format format;
  std::unordered_map<std::string,std::vector<ModifiedCommand*>>macros;
};
class LanCommand : public Command{
public:
  LanCommand(std::string str,Editor *editor,Environ *environ,Lang lan):Command(std::move(str),editor),environ(environ),lan(lan){
  }
  inline std::string
  execute(){
    environ->lang = lan;
    return std::string("");
  }
private:
  Environ *environ;
  Lang lan;
};
class ContextCommand : public Command{
public:
  ContextCommand(std::string str,Editor *editor,Environ *environ,Format format):Command(std::move(str),editor),environ(environ),format(format){
  }
  inline std::string
  execute(){
    environ->format = format;
    return std::string("");
  }
private:
  Environ *environ;
  Format format;
};
#endif
